<%-- 
    Document   : sample2
    Created on : 2009-7-11, 17:21:14
    Author     : think
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <title>Populating an element using Ajax.Updater</title>
        <script type="text/javascript" src="prototype.js"></script>
    </head>
    <body>
        <div>
            <input type="button" value="Click Me!" id="myButton" />
        </div>

        <script type="text/javascript">
            function onButtonClick(e)
            {
                var button = Event.element(e);

                new Ajax.Updater(button.up(), 'part.html');
            }

            $('myButton').observe('click', onButtonClick);
        </script>
    </body>
</html>